// 交互提示信息 （表单验证 错误提示）
<template>
<div class="notice-modal">
    <p>
        {{txt}}
    </p>

    <div class="btn-group">

        <Button class='btn cancel' type='error' size='small' v-if='cancelFn' @click='cancelFn'>
            取消
        </Button>

        <Button class='btn enter' type='primary' size='small' @click='enter'>
            确认
        </Button>
        
    </div>
   
</div>
</template>

<script lang='ts'>
import {Component, Prop, Vue} from 'vue-property-decorator'
let vue:any = new Vue()

@Component({})
export default class noticeModal extends Vue{
    name:string = 'notice-modal'

    @Prop()
    pag:string

    @Prop()
    txt:string
    
    @Prop()
    enterFn

    @Prop()
    cancelFn


    enter(){

        if(this.enterFn){
            this.enterFn()
        }else{
            vue.$Notice.close(this.pag);
        }
        
    }

}


</script>

<style scoped lang='scss'>

.btn-group{
    display: flex;
    // justify-content: left;
    align-items: center;

    margin-top:_rem(20px);

    .btn + .btn{
        margin-left: _rem(10px);
    }
}
</style>